package com.fudan.adse.service;

import com.fudan.adse.domain.dto.NewOrderDTO;
import com.fudan.adse.domain.po.TicketOrder;
import com.fudan.adse.domain.po.Wallet;
import com.fudan.adse.domain.vo.StatisticsVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 消费订单服务
 *
 * @author Jerry Zhang
 * create: 2022-11-23 22:59
 */
public interface OrderService {
    /**
     * 分页获取购票订单
     *
     * @param username
     * @param status
     * @param checkStatus
     * @param rowPieceId
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<TicketOrder> getOrdersByConditions(String username, String status, String checkStatus,
                                            Integer rowPieceId, Integer pageNum, Integer pageSize);


    /**
     * 购票
     * @param newOrder
     */
    TicketOrder addOrder(NewOrderDTO newOrder);

    /**
     * 更新订单支付状态、使用状态等
     * @param uuid
     * @param status
     * @param checkStatus
     * @return
     */
    @Transactional
    Wallet updateOrder(String uuid, String status, String checkStatus);

    /**
     * 分级查看影院、影片以及场次的收益情况
     * @param cinemaId
     * @param filmId
     * @param rowPieceId
     * @return
     */
    StatisticsVO getStatisticsDataByConditions(Integer cinemaId, Integer filmId, Integer rowPieceId);
}
